package com.lostandfound.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lostandfound.dao.ThanksDao;
import com.lostandfound.entity.ThanksLetter;
import com.lostandfound.service.ThanksService;

@Service("thanksService")
@Transactional
public class ThanksServiceImpl implements ThanksService {
	
	@Autowired
	private ThanksDao thanksDao;

	@Override
	public Serializable save(ThanksLetter obj) {
		return thanksDao.save(obj);
	}

	@Override
	public void update(ThanksLetter obj) {
		thanksDao.update(obj);
	}

	@Override
	public void delete(ThanksLetter obj) {
		thanksDao.delete(obj);
	}

	@Override
	public ThanksLetter selectByPrimary(Long id) {
		return thanksDao.selectByPrimary(id);
	}

	@Override
	public List<?> listThanksByPage(Map<String, Object> pagemap) {
		return thanksDao.listThanksByPage(pagemap);
	}

	@Override
	public int Count(Map<String, Object> pagemap) {
		return thanksDao.Count(pagemap);
	}

	@Override
	public void deleteThanksByBranch(Long[] thanks) {
		thanksDao.deleteThanksByBranch(thanks);
	}

	@Override
	public void deleteThanksByUser(Long uid) {
		thanksDao.deleteThanksByUser(uid);
	}

	@Override
	public void deleteThanksByTopic(Long tid) {
		thanksDao.deleteThanksByTopic(tid);
	}

}
